package com.example.demo.result;

import com.baomidou.mybatisplus.core.metadata.OrderItem;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @program: TianfuHealth
 * @description: 自定义分页
 * @author: Mr.Abel SJY
 * @Email thanksjava@qq.com
 * @create: 2023-07-08 16:22
 **/
@Api(tags = "分页对象")
@Data
public class MyPage<T> {

    @ApiModelProperty(value = "数据")
    private List<T> records;

    @ApiModelProperty(value = "总数")
    private long total;

    @ApiModelProperty(value = "每页总长度")
    private long size;

    @ApiModelProperty(value = "当前页数")
    private long current;

    @ApiModelProperty(value = "排序字段信息")
    private List<OrderItem> orders;

    @ApiModelProperty(value = "是否查询总数")
    private Boolean searchCount;

    @ApiModelProperty(value = "总页数")
    private long pages;
}
